/*

Author   : chaos

FileName : con_add1.cpp

Date     : 09/08/17 14:41:49

*/
#include <iostream>
using namespace std;

void print_arr(const int *,int);

int main(int argc ,char *argv[])
{
    int arr[] = {1,2,3};

    print_arr(arr,3);


    return 0;
}

void print_arr(const int *arr, int size){
    for (int i = 0; i < size; i++) {
        cout << "arr[" << i << "]=" << *(arr++) << endl;
    }
// it's error to change the val
    //arr[0] = 5;
}
